home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
src
/
fig06_08.jar
/
Ch06
/
Fig06_08
/
Time2.h
< prev
Wrap
C/C++ Source or Header
|
1997-10-16
|
649b
|
25 lines
// Fig. 6.8: time2.h
// Declaration of the Time class.
// Member functions are defined in time2.cpp
// preprocessor directives that
// prevent multiple inclusions of header file
#ifndef TIME2_H
#define TIME2_H
// Time abstract data type definition
class Time {
public:
Time( int = 0, int = 0, int = 0 ); // default constructor
void setTime( int, int, int ); // set hour, minute, second
void printMilitary(); // print military time format
void printStandard(); // print standard time format
private:
int hour; // 0 - 23
int minute; // 0 - 59
int second; // 0 - 59
};
#endif